#ifndef PARTICLE_H_
#define PARTICLE_H_

#include "model/cube.h"

class Particle{
	protected:
		float dropSpeed;
		Cube size;
	public:
		Particle(const Cube& size){
			this->dropSpeed = 0;
			this->size = size;
		}

		virtual ~Particle(){
		}

		float getDropSpeed(){ return dropSpeed; }

		virtual void accelerate(float accel){
			this->dropSpeed += accel;
		}

		void advanceTime(){
			this->size.translate(0.0f,0.0f,this->dropSpeed);
			this->notifyParticlePositionChange(this->dropSpeed);
		}

		virtual void notifyCollided(Solid* obj)=0;
		virtual void notifyParticlePositionChange(float vel=0)=0;

		Cube& getSize(){ return this->size; }
		void setSize(const Cube& cube){ this->size = cube; }

		bool operator<(const Particle& solid)const{
			return(this->size<solid.size);
		}
};

#endif /* PARTICLE_H_ */
